﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DatabaseAccess;
using System.Data;
using System.Text;
namespace Liguo
{
    public partial class commodity : System.Web.UI.Page
    {
 
        protected void Page_Load(object sender, EventArgs e)
        {   if(!IsPostBack)
      {

      } SqlIt sql = new SqlIt();
        DataSet ds = sql.SelectAll("GoodsInfo");
        grid.DataSource = ds;
        grid.DataBind();

    }
        protected void onlick(object sender, System.EventArgs e)
        {
            LinkButton lkb = sender as LinkButton;
            string id = lkb.CommandArgument;
            string url;
            url="Goodsinfo.aspx?ID=" +id;
            Response.Redirect(url);
         
        }

        protected void grid_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
        {
            this.grid.CurrentPageIndex = e.NewPageIndex;
            this.grid.DataBind(); 
        }

        protected void grid_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

    
            
       

    }
}